<extend name="Base/common" />

<block name="style">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Api/css/main.css">
	
	<style>
		body,li,p,ul { 
		    margin: 0;
		    padding: 0;
		    font: 12px/1 Tahoma, Helvetica, Arial, "\5b8b\4f53", sans-serif;
		}
		ul, li, ol { list-style: none; }
		/* 重置文本格式元素 */
		a { text-decoration: none; cursor: pointer; color:#333333; font-size:14px;}
		a:hover { text-decoration: none; }
		.clearfix::after{ display:block; content:''; height:0; overflow:hidden; clear:both;} 
		/*星星样式*/
		.content{ width:600px; margin:0 auto; padding-top:20px;}
		.title{ font-size:14px; background:#dfdfdf; padding:10px; margin-bottom:10px;}
		.block{ width:100%; margin:0 0 20px 0; padding-top:10px; padding-left:50px; line-height:21px;}
		.block .star_score{ float:left;}
		.star_list{height:21px;margin:50px; line-height:21px;}
		.block p,.block .attitude{ padding-left:20px; line-height:21px; display:inline-block;}
		.block p span{ color:#C00; font-size:16px; font-family:Georgia, "Times New Roman", Times, serif;}
		.star_score { background:url(__PUBLIC__/Api/images/stark2.png); width:160px; height:21px;  position:relative; }
		.star_score a{ height:21px; display:block; text-indent:-999em; position:absolute;left:0;}
		.star_score a:hover{ background:url(__PUBLIC__/Api/images/stars2.png);left:0;}
		.star_score a.clibg{ background:url(__PUBLIC__/Api/images/stars2.png);left:0;}
		#starttwo .star_score { background:url(__PUBLIC__/Api/images/starky.png);}
		#starttwo .star_score a:hover{ background:url(__PUBLIC__/Api/images/starsy.png);left:0;}
		#starttwo .star_score a.clibg{ background:url(__PUBLIC__/Api/images/starsy.png);left:0;}
		/*星星样式*/
		.show_number{ padding-left:50px; padding-top:20px;}
		.show_number li{ width:240px; border:1px solid #ccc; padding:10px; margin-right:5px; margin-bottom:20px;}
		.atar_Show{background:url(__PUBLIC__/Api/images/stark2.png); width:160px; height:21px;  position:relative; float:left; }
		.atar_Show p{ background:url(__PUBLIC__/Api/images/stars2.png);left:0; height:21px; width:134px;}
		.show_number li span{ display:inline-block; line-height:21px;}
	</style>
</block>

<block name="Content">

<div class="page-group">
    <div class="page page-current">
        <div class="content native-scroll">
            <div class="choose-people">
                <!--个人信息-->
                <div class="people-info infinite-scroll">
                    <div class="list-block">
                        <ul class="ul-bg">
                        </ul>
                    </div>
                    
                    <!-- 加载提示符 -->
					<div class="infinite-scroll-preloader">
			            <div class="preloader"></div>
			        </div>
                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" name="lastIndex" id="lastIndex" value="0"/>
</block>

<block name="script">
<script src="__PUBLIC__/Api/js/startScore.js" type="text/javascript"></script>
<script type="text/javascript">

var target = Think.U('Worker/ajax_workerList');
var params = ['lastIndex'];
var container = '.infinite-scroll .list-block .ul-bg';

$("#lastIndex").val('0');

//显示分数
$(".item-inner .people-name p").each(function(index, element) {
  var num=$(this).attr("tip");
  var www=num*2*16;
  $(this).css("width",www);
  $(this).parent(".atar_Show").siblings("span").text(num+"分");
});

function joinHTML(data){
	
	var html = '';
	var detailURL = '';
	var photo = './Public/Api/images/zhidingxiaoge-pic.jpg';
	var star = '';
	
	$.each(data, function(key, val){
		
		detailURL = '{:U("Worker/viewAction",'','')}/worker_id/'+val['worker_id']+'.html';
		photoURL = val['fullpath'] ? val['fullpath'] : photo;
		star = '';
		
		for (var i=0;i<5;i++){
			if(val['score']/2 > i){
				star += '<img src="./Public/Api/images/taoxin.png">';
			}
		}
		
		star = star ? star : '<img src="./Public/Api/images/taoxin.png">';
		
		html += '<li class="item-content item-link tuijian" onclick="javascript:window.location.href=\'' + detailURL + '\'">';
		html += '<div class="item-media"><i class="icon icon-f7"></i></div><div class="item-inner"><div class="item-title">';
		html += '<div class="people-pic"><img src="' + photoURL + '"></div><div class="people-name"><p>' + val['name'] + '</p>';
		html += '<p>' + star + '</p><p>' + val['orders_sum'] + '单</p></div><div class="item-after"><div class="people-aptitude">';
		html += '<p>工号 : ' + val['eid'] + '</p><p>&nbsp;</p><p>工种 : ' + val['profession_str'] + '</p></div></div></div></li>';
	});
	
	return html;
}

</script>

<script src="__PUBLIC__/Api/js/pageLoading.js" type="text/javascript"></script>
</block>

